// 费用类型
export enum ExpenseType {
  FUEL = 'fuel', // 加油
  MAINTENANCE = 'maintenance', // 保养
  REPAIR = 'repair', // 维修
  OTHER = 'other', // 其他
}

// 油类型
export enum FuelType {
  GASOLINE_87 = '87#',
  GASOLINE_92 = '92#',
  GASOLINE_93 = '93#',
  GASOLINE_95 = '95#',
  GASOLINE_97 = '97#',
  GASOLINE_98 = '98#',
  DIESEL = 'diesel',
  ETHANOL = 'ethanol',
}

// 维修类型
export enum RepairType {
  ENGINE = '发动机维修',
  TRANSMISSION = '变速箱维修',
  BRAKE = '制动系统',
  SUSPENSION = '悬挂系统',
  ELECTRICAL = '电气系统',
  AIR_CONDITIONING = '空调系统',
  BODY = '车身维修',
  OTHER = '其他',
}

// 保养类型
export enum MaintenanceType {
  OIL_CHANGE = '机油更换',
  FILTER_CHANGE = '滤芯更换',
  TIRE_ROTATION = '轮胎换位',
  BRAKE_INSPECTION = '制动检查',
  AIR_FILTER = '空气滤清器',
  FUEL_FILTER = '燃油滤清器',
  SPARK_PLUG = '火花塞',
  TIMING_BELT = '正时皮带',
  OTHER = '其他',
}

// 费用记录接口
export interface ExpenseRecord {
  id: string;
  type: ExpenseType;
  amount: number;
  date: Date;
  mileage?: number;
  description?: string;
  location?: string;
  // 加油特有字段
  fuelType?: FuelType;
  fuelAmount?: number;
  fuelPrice?: number;
  isFullTank?: boolean;
  isLowFuel?: boolean;
  // 保养/维修特有字段
  laborCost?: number;
  partsCost?: number;
  maintenanceType?: string;
  repairType?: RepairType;
}

// 车辆信息接口
export interface Vehicle {
  id: string;
  name: string;
  brand: string;
  model: string;
  year: number;
  licensePlate: string;
  currentMileage: number;
  fuelType: FuelType;
  maintenanceSchedule: MaintenanceSchedule[];
}

// 保养计划接口
export interface MaintenanceSchedule {
  id: string;
  type: string;
  interval: number; // 公里数间隔
  lastService: Date;
  nextService: Date;
  cost: number;
}

// 统计数据接口
export interface Statistics {
  totalExpense: number;
  monthlyExpense: number;
  fuelExpense: number;
  maintenanceExpense: number;
  averageFuelConsumption: number;
  totalMileage: number;
  monthlyMileage: number;
}

// 用户信息接口
export interface User {
  id: string;
  name: string;
  email: string;
  avatar?: string;
  joinDate: Date;
  totalDays: number;
  totalExpense: number;
}
